
// new methods for creating styles
Object.extend(Refresh.Web.ListItemBuilder, {
	createStylesList:function(items) {
		
		var formattedItems = [];		
		for (var i=0; i<items.length; i++) {
			var item = items[i].toString();
			formattedItems.push({text: item, value: item, display: '<span class="' + item + '">' + item +  '</span>'});
		}
		return formattedItems;
			
	},

	parseCssClasses: function(cssUrl) {
		
		var formattedItems = [];		
		return formattedItems;	
	}
});

//Editor Commands
Refresh.Web.StyleCommands = {
	setCssClass: function(ftb,className) {
		ftb.setCssClass(className);
	},
	getCssClass: function(ftb) {
		return ftb.getCssClass();
	}
};




// table buttons
Refresh.Web.EditorCommands.addCommand({name:'CssClass',type:'gallerybutton',execute:function(ftb,value,src) {  /* show list */  },getValue:Refresh.Web.QueryMethods.alwaysOn });
Refresh.Web.EditorCommands.addCommand({name:'EditCssProperties',execute:function(ftb,value) { /*launch editor */ },getValue:Refresh.Web.QueryMethods.alwaysOn});
Refresh.Web.EditorCommands.addCommand({name:'CssClassList',type:'combobox',
	execute:function(ftb,value) { ftb.setCssClass(value); },
	getValue:function(ftb) { return ftb.getCssClass(); },
	defaultSettings: {title: 'CSS Class',listWidth: '150px', width:'80px'}  });

